﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TimeTracker.Models
{
    public class EntriesPerDay
    {
        public DateTime Date { get; set; }
        public IEnumerable<EntryModel> Entries { get; set; }

        public TimeSpan TotalElapsedTime
        {
            get
            {
                return Entries.Aggregate(TimeSpan.Zero, (x, y) => x.Add(y.ElapsedTime));
            }
        }
    }
}
